@import "variables.less";
@import "/jui/less/mixins.less";
@import "mixins/index.less";
// import the appropriate color scheme based on header
@import "menu-@{headerstyle}.less";

.gf-menu {
	// Bottom border fixer
	&.l1 > li {
		&:hover > .item {
			.border-fixer {
				display:block;
				position: absolute;
				height: 0px;
				width: 100%;
				bottom:0px;
				left: 0px;
				color:@white;
				
			}
		}
	}

	// Default items
	li {
		&:hover, &.active:hover {
			border: 0px solid @menuBorder;
			color:@white;
			
			
			border-top: 0;
			

			> .dropdown {
				left: -1px;
				top: auto;
				opacity: 1;
			}
		}

		&:hover > .item {
			color:@white; !important;
			
		}
	}

	// Parent items
	li.parent {
		&:hover {
			
		}
	}

	// Dropdown styling
	.dropdown {
		ul {
			li {
				&:hover {
					
					background: @black;
					.box-shadow(none);
					padding:5px 0px;
border-top: 1px solid rgba(0,0,0,0.1);
					> .item {
						
						border: 0;
						border-bottom: 0;
						border-top: 0;
						color:@white;

						// Right border fixer
						.border-fixer {
							display:block;
							position: absolute;
							height: 100%;
							width: 0px;
							right:-1px;
							
							top: 0px;
							background: @menuDropBack;
							
						}
					}
				}

				&.parent {
					&:hover {
						> .item {
							
						}
					}
				}
			}
		}

		// Grouped styling
		.grouped {
		&:hover{padding:5px 0px 0px 0px;}	
			&.parent {
				&:hover {
					> .item {
						
					}
				}
			}
		}
		

		// Module styling
		.modules {
			&:hover, ul li:hover {
				padding-top: 0 !important;
			}
		}
	}

	// Flyout dropdowns (3rd Level +)
	.dropdown li:hover > .flyout {
		left: 100%;
		top: 1px;
		margin-left: -6px;
		border-top: 0;
		
	}
}

// RTL
body.rtl {
	li {
		&:hover, &.active:hover {
			> .dropdown {
				left: inherit;
				right: -1px;
				
			}
		}
	}
	.dropdown {
		ul {
			li {
				&:hover {
					> .flyout {
						left: inherit;
						right: 100%;
						
						margin-left: auto;
						margin-right: -6px;
					}
					> .item {
						// Left border fixer
						.border-fixer {
							right: inherit;
							left: -1px;
						}
					}
				}
				&.parent {
					&:hover {
						> .item {
							
						}
					}
				}
			}
		}
	}
}
